Get Master Locations
Method: GET
/data-provider/locations
As a Data Provider of iFoodDS, you can use the Get Master Locations API to query master locations from the iFoodDS Trace Exchange platform.
info
This endpoint is being refined and thus subject to change. These docs will update when changes are made.
Request
Type: application/json
Retrieving master locations via the API is done through paging. The request requires a series of query parameters which define the page that must be returned. These parameters must be supplied in the url when the get is executed in order to return the result set for the page being queried.
Query Parameters
Optional
page
(number): The page index of the locations to return. The first page is index 0.size
(number): The number of results to return per page. Default value is 20.submitStartDateTime
(datetime): Filters results to include only locations submitted after the specified date and time.submitEndDateTime
(datetime): Filters results to include only locations submitted before the specified date and time.
Data Constraints
Please note the following data constraints:
datetimes
must use the format:yyyy-MM-ddTHH:mm:ss
Response
- 200
- 400
Return result for the master locations queried.
{
"content": [
{
"id": "<location id>",
"dataProviderVendorId": "<data provider vendor id>",
"gln": "<global location number>",
"city": "<city>",
"duns": "<duns number>",
"state": "<state>",
"country": "<country>",
"geoFence": "<geo fence coordinates>",
"postalCode": "<postal code>",
"phoneNumber": "<phone number>",
"businessUnit": "<business unit>",
"locationCode": "<location code>",
"locationName": "<location name>",
"locationType": "<location type>",
"glnAssignedBy": "<gln assigned by>",
"gpsCoordinates": "<gps coordinates>",
"streetAddress1": "<street address 1>",
"streetAddress2": "<street address 2>",
"isCoveredByGdst": <is covered by gdst>,
"parentLocationId": "<parent location id>",
"isPrimaryLocation": <is primary location>,
"alternateLocationId": "<alternate location id>"
}
],
"pageable": {
"pageNumber": <page number>,
"pageSize": <page size>,
"sort": {
"unsorted": <is unsorted>,
"sorted": <is sorted>,
"empty": <is page empty>
},
"offset": <offset size>,
"unpaged": <is unpaged>,
"paged": <is paged>
},
"totalPages": <total pages>,
"totalElements": <total elements>,
"last": <is last page>,
"numberOfElements": <number of elements>,
"size": <page size>,
"number": <page number>,
"sort": {
"unsorted": <is unsorted>,
"sorted": <is sorted>,
"empty": <is empty>
},
"first": <is first page>,
"empty": <is page empty>
}
Content
id
(uuid): The unique identifier for the locationdataProviderVendorId
(string): The ID you, the data provider, have for the vendor.dataProviderVendorName
(string): The name you, the data provider, have for the vendor.gln
(string): GS1 Global Location Number, a 13-digit string. GS1 GTIN Executive Summarycity
(string): The city where the location is situatedduns
(string): Data Universal Numbering System identifierstate
(string): The state or province where the location is situatedcountry
(string): The country where the location is situatedgeoFence
(string): A series of GPS coordinates that define the boundaries of the locationpostalCode
(string): The postal or ZIP code for the locationphoneNumber
(string): Contact phone number for the locationbusinessUnit
(string): The business unit associated with this locationlocationCode
(string): A unique code identifier for the locationlocationName
(string): The name of the locationlocationType
(string): The type of locationglnAssignedBy
(string): The organization that assigned the GLNgpsCoordinates
(string): The GPS coordinates for the locationstreetAddress1
(string): The primary street addressstreetAddress2
(string): Additional address information (e.g., suite number)isCoveredByGdst
(boolean): Indicate if the location is part of GDSTparentLocationId
(string): Identifier for the parent location, if this is a child locationisPrimaryLocation
(boolean): Indicates if this is the primary locationalternateLocationId
(string): Alternate ID of the location
Pageable
pageable
(object)pageNumber
(number): The current page number in the page series. Index 0 is first pagepageSize
(number): The number of events contained in the pageoffset
(number): If there is an offset specified on there return results this will be populates. Default is 0unpaged
(boolean): If the record set is unpaged then true else falsepaged
(boolean): If the record set is paged then true else falsesort
(object)unsorted
(boolean): If the record set is unsorted then true else falsesorted
(boolean): If the record set is sorted then true else falseempty
(boolean): If the record set is empty then true else false
totalPages
(number): The total amount of pages that contain all events in the querytotalElements
(number): The total amount of events in the querylast
(boolean): If the page is the last in the series then true else falsenumberOfElements
(number): The total amount of events in the tablesize
(number): The number of events contained in the pagenumber
(number): The current page number in the page seriessort
(object)unsorted
(boolean): If the record set is unsorted then true else falsesorted
(boolean): If the record set is sorted then true else falseempty
(boolean): If the record set is empty then true else false
first
(boolean): If the page is the first in the series then true else falseempty
(boolean): If the page is empty then true else false
Sample Response
{
"content": [
{
"id": "d96583b3-8cf9-43bb-9db3-02f060bb4a53",
"gln": "1234567890123",
"city": "Springfield",
"duns": "123456789",
"state": "IL",
"country": "US",
"geoFence": "40.28,-84.15,40.29,-84.14,40.27,-84.14",
"postalCode": "62701",
"phoneNumber": "+1-800-555-0199",
"businessUnit": null,
"locationCode": "CDC001",
"locationName": "Central Distribution Center",
"locationType": "Internal",
"glnAssignedBy": "GS1",
"gpsCoordinates": "86.271142,-79.593557",
"streetAddress1": "123 Main St",
"streetAddress2": "Suite 100",
"isCoveredByGdst": false,
"parentLocationId": "HQ001",
"isPrimaryLocation": true,
"alternateLocationId": null,
"dataProviderVendorId": "127-A",
"dataProviderVendorName": "Hillsbrad Farms LLC"
}
],
"pageable": {
"pageNumber": 0,
"pageSize": 20,
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"offset": 0,
"unpaged": false,
"paged": true
},
"totalPages": 22,
"totalElements": 440,
"last": false,
"numberOfElements": 20,
"size": 20,
"number": 0,
"sort": {
"unsorted": true,
"sorted": false,
"empty": true
},
"first": true,
"empty": false
}
Description of what user-fixable validation error occurred and in what part of the payload
{
"timestamp": "2024-12-08T20:47:54.096+00:00",
"status": 400,
"error": "Bad Request",
"message": "<error description>"
}